import gcRequest from '..'
import { mailRes } from './types'

export const sendMail = (mail: string) => {
  return gcRequest.post<mailRes.RootObject>({
    url: '/mail',
    data: {
      mail
    }
  })
}

export const checkMailCode = (mail: string, code: string) => {
  return gcRequest.post<mailRes.RootObject>({
    url: '/mail/check',
    data: {
      mail,
      code
    }
  })
}
